package com.fh.shop.admin.controller.log;

import com.fh.shop.admin.biz.log.ILogService;
import com.fh.shop.admin.param.log.LogQueryParam;
import com.fh.shop.admin.common.DataTableResult;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;

@Controller
@RequestMapping("/log")
public class LogController {
    @Resource(name = "logInfoService")
    private ILogService logService;

    @RequestMapping("/toLog")
    public String toLog(){
        return "log/list";
    }

    @RequestMapping(value = "/list",method = RequestMethod.POST)
    public @ResponseBody
    DataTableResult list(LogQueryParam logQueryParam){
        return logService.findLogList(logQueryParam);
    }
}
